package com.yanqu.road.logic.bussiness.player;

import com.yanqu.road.logic.bussiness.DaoHelper;
import com.yanqu.road.entity.minewar.*;
import com.yanqu.road.entity.player.UserMineWarPatronsData;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class UserMineWarBussiness {

    public static Map<Integer, Map<Integer, UserMinePit>> getUserMinePitMap() {
        return DaoHelper.getUserMineWarDaoImpl().getUserMinePitMap();
    }

    public static boolean initUserMinePitMap(Map<Integer, MinePitInfo> minePitInfoMap, Map<Integer, UserMinePit> userMinePitMap) {
        return DaoHelper.getUserMineWarDaoImpl().initUserMinePitMap(minePitInfoMap, userMinePitMap);
    }

    public static boolean updateUserMinePitList(List<UserMinePit> userMinePitList) {
        return DaoHelper.getUserMineWarDaoImpl().updateUserMinePitList(userMinePitList);
    }

    public static Map<Integer, Map<Integer, UserMineRefuge>> getUserMineRefugeMap(long userId) {
        return DaoHelper.getUserMineRefugeDaoImpl().getUserMineRefugeMap(userId);
    }

    public static boolean addUserMineRefuge(UserMineRefuge userMineRefuge) {
        return DaoHelper.getUserMineRefugeDaoImpl().add(userMineRefuge);
    }

    public static boolean updateUserMineRefuge(UserMineRefuge userMineRefuge) {
        return DaoHelper.getUserMineRefugeDaoImpl().update(userMineRefuge);
    }

    public static Map<Long, List<MineWarRecord>> getMineWarRecordMap() {
        return DaoHelper.getMineWarRecordDaoImpl().getMineWarRecordMap();
    }

    public static boolean addMineWarRecordList(List<MineWarRecord> mineWarRecordList){
        return DaoHelper.getMineWarRecordDaoImpl().addMineWarRecordList(mineWarRecordList);
    }

    public static Map<Integer, UserMineWarPatronsData> getUserMineWarPatronsDataMap(long userId) {
        return DaoHelper.getUserMineWarPatronsDaoImpl().getUserMineWarPatronsDataMap(userId);
    }

    public static boolean addUserMineWarPatronsData(UserMineWarPatronsData userMineWarPatronsData) {
        return DaoHelper.getUserMineWarPatronsDaoImpl().add(userMineWarPatronsData);
    }

    public static boolean updateUserMineWarPatronsData(UserMineWarPatronsData userMineWarPatronsData) {
        return DaoHelper.getUserMineWarPatronsDaoImpl().update(userMineWarPatronsData);
    }

    public static boolean updateUserMineWarPatronsData(long userId, List<Integer> patronsIdList, int dispatchMine, int type, int pitId) {
        return DaoHelper.getUserMineWarPatronsDaoImpl().updateUserMineWarPatronsData(userId, patronsIdList, dispatchMine, type, pitId);
    }

    public static LinkedList<MineWarNotice> getMineWarNoticeList(int maxCount) {
        return DaoHelper.getMineWarNoticeDaoImpl().getMineWarNoticeList(maxCount);
    }

    public static boolean addMineWarNoticeList(List<MineWarNotice> noticeList) {
        return DaoHelper.getMineWarNoticeDaoImpl().addMineWarNoticeList(noticeList);
    }

    public static UserMineData getUserMineData(long userId) {
        return DaoHelper.getUserMineDataDaoImpl().getUserMineData(userId);
    }

    public static Map<Long, UserMineData> getUserMineDataMap() {
        return DaoHelper.getUserMineDataDaoImpl().getUserMineDataMap();
    }

    public static boolean addUserMineData(UserMineData userMineData) {
        return DaoHelper.getUserMineDataDaoImpl().add(userMineData);
    }

    public static boolean updateUserMineData(UserMineData userMineData) {
        return DaoHelper.getUserMineDataDaoImpl().update(userMineData);
    }
}
